-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
node-week3/Niloufar #225
base: main
Are you sure you want to change the base?
node-week3/Niloufar #225
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, very nice job! thanks a lot!
} | ||
} | ||
|
||
console.log("SQL", query.toSQL().sql); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤩 debug statement!! Thank you!!.. normally when we are done debugging we remove them in order not to pollute the server output
|
||
if ("sort" in req.query) { | ||
const orderBy = req.query.sort.toString(); | ||
if (orderBy === "first_name"){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the input query parameter will be first_name%20ASC, meaning sort by first name ascending. so orderby check here would be
if (orderBy === "first_name ASC"){ //... }
the same for orderBy last name.
sql.injection.mp4